package com.sa.web.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import com.sa.web.bean.EstBean;
import com.sa.web.dao.service.EstDao;

public class EstDaoImpl implements EstDao{
	
	private SqlMapClientTemplate sqlMapClientTemplate;

	/**
	 * 获得管理员信息列表
	 */
	@Override
	public List<EstBean> getEstList(int start,int size) {
		Map<String,Object> map = new HashMap<String,Object> ();
		map.put("start", start);
		map.put("size", size);
		return (List<EstBean>)sqlMapClientTemplate.queryForList("getEstList",map);
	}
	
	@Override
	public EstBean getEstById(String id) {
		return (EstBean)sqlMapClientTemplate.queryForObject("getEstById",id);
	}



	/**
	 * 获得管理员信息总数
	 */
	@Override
	public Integer getEstCount() {
		return (Integer)sqlMapClientTemplate.queryForObject("getEstCount");
	}

	public SqlMapClientTemplate getSqlMapClientTemplate() {
		return sqlMapClientTemplate;
	}

	public void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

}
